package com.yq.cp.mapper.basics;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yq.cp.entity.basics.OrganizationalStructure;
import com.yq.cp.entity.basics.model.SiteHeaderToUser;
import com.yq.cp.entity.basics.model.UserToStructureModel;
import com.yq.cp.entity.common.PageVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 组织架构 Mapper 接口
 * </p>
 *
 * @author shenyuqing
 * @since 2024-08-27
 */
public interface OrganizationalStructureMapper extends BaseMapper<OrganizationalStructure> {

    IPage<UserToStructureModel> channelExamineList(@Param("page") IPage<UserToStructureModel> page,@Param("vo") PageVo vo);

    IPage<OrganizationalStructure> siteList(@Param("page")IPage<OrganizationalStructure> page, @Param("vo")PageVo vo);

    Page<OrganizationalStructure> switchSite(@Param("page")Page<OrganizationalStructure> page,@Param("vo")PageVo vo);

    IPage<SiteHeaderToUser> siteHeaderExamineList(@Param("page")IPage<SiteHeaderToUser> page, @Param("vo")PageVo vo);
    @Update("UPDATE t_organizational_structure set delete_examine = null,delete_account_name = null,delete_account_id = null,delete_account_time = null  WHERE id=#{id}")
    void huanyuan(@Param("id") Long id);

    IPage<SiteHeaderToUser> channelExamineListevery(@Param("page")IPage<SiteHeaderToUser> page, @Param("vo")PageVo vo);


    List<Map<String,Object>> sxnyz();
    List<OrganizationalStructure> sxnyz1(Long id);
}
